import { systemUpdateSchema } from "~/validators/system";
export default defineEventHandler(async (event) => {
  const result = await runValidate(systemUpdateSchema, event);

  const newData = SystemSchema.findByIdAndUpdate(result.data._id, result.data, {
    new: true,
  });
  return newData;
});
